< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03102900.xhp

(section: lbound) (bookmark: bm_id3156027)
LBound function

LBound 関数

LBound Function [Runtime]
LBound 関数 [実行時](hd_id3156027.1)

Returns the lower boundary of an array.
配列のインデックス範囲の下限値を返します。(par_id3147226.2)

(/section: lbound)

Syntax:
構文:(hd_id3148538.3)

LBound (ArrayName [, Dimension])
LBound (ArrayName [, Dimension])(par_id3150503.4)

Return value:
戻り値:(hd_id3150984.5)

Integer
整数(par_id3153126.6)

Parameters:
パラメータ:(hd_id3144500.7)

ArrayName: Name of the array for which you want to return the upper (Ubound) or the lower (LBound) boundary of the array dimension.
ArrayName: インデックス範囲の最大値 (Ubound) ないし最小値 (LBound) を確認する配列の名前。(par_id3145069.8)

[Dimension]: Integer that specifies which dimension to return the upper (Ubound) or the lower (LBound) boundary for. If a value is not specified, the first dimension is assumed.
[Dimension]: インデックス範囲の最大値 (Ubound) ないし最小値 (LBound) を確認する次元を示す整数値。この値を指定しない場合は、最初の次元が適用されます。(par_id3149457.9)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

(embed text/sbasic/shared/00000003.xhp#err9 : linkinfo)

9 Subscript out of range
9 サブスクリプトが範囲外です(par_id3148900.45)

(/embed text/sbasic/shared/00000003.xhp#err9)

Example:
例:(hd_id3145171.10)

Sub ExampleUboundLbound
Sub ExampleUboundLbound(par_id3148673.11)

Dim sVar(10 to 20) As String
Dim sVar(10 to 20) As String(par_id3153193.12)

print LBound(sVar())
print LBound(sVar())(par_id3148452.13)

print UBound(sVar())
print UBound(sVar())(par_id3153768.14)

end Sub
end Sub(par_id3147288.15)

Sub ExampleUboundLbound2
Sub ExampleUboundLbound2(par_id3146974.16)

Dim sVar(10 to 20,5 To 70) As String
Dim sVar(10 to 20,5 To 70) As String(par_id3146985.17)

Print LBound(sVar()) REM Returns 10
Print LBound(sVar()) REM 戻り値は 10(par_id3145365.18)

Print UBound(sVar()) REM Returns 20
UBound(sVar()) REM 戻り値は 20(par_id3150486.19)

Print LBound(sVar(),2) REM Returns 5
Print LBound(sVar(),2) REM 戻り値は 5(par_id3149665.20)

Print UBound(sVar(),2) REM Returns 70
Print UBound(sVar(),2) REM 戻り値は 70(par_id3159154.21)

end Sub
end Sub(par_id3154013.22)


< Prev / Next >